package imports;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


/**
 * The persistent class for the contacto database table.
 * 
 */
@Entity
@Table(name="contacto")
@NamedQueries({
	@NamedQuery(name = "Contacto.findAll", query = "SELECT c FROM Contacto c"),  
    @NamedQuery(name = "Contacto.findById", query = "SELECT c FROM Contacto c WHERE c.idContacto = :idContacto"),  
    @NamedQuery(name = "Contacto.findByNombre", query = "SELECT c FROM Contacto c WHERE c.nombre = :nombre"),  
    @NamedQuery(name = "Contacto.findByCorreo1", query = "SELECT c FROM Contacto c WHERE c.correo1 = :correo1"),  
    @NamedQuery(name = "Contacto.findByCorreo2", query = "SELECT c FROM Contacto c WHERE c.correo2 = :correo2"),
    @NamedQuery(name = "Contacto.findByCorreo3", query = "SELECT c FROM Contacto c WHERE c.correo3 = :correo3"),
    @NamedQuery(name = "Contacto.findByMsn", query = "SELECT c FROM Contacto c WHERE c.msn = :msn"),
    @NamedQuery(name = "Contacto.findByTel1", query = "SELECT c FROM Contacto c WHERE c.tel1 = :tel1"),
    @NamedQuery(name = "Contacto.findByTel2", query = "SELECT c FROM Contacto c WHERE c.tel2 = :tel2"),
    @NamedQuery(name = "Contacto.findByTel3", query = "SELECT c FROM Contacto c WHERE c.tel3 = :tel3")})  
public class Contacto implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "idContacto")
    private Integer idContacto;
	@Size(max = 45)
    @Column(name = "correo1")
    private String correo1;
    @Size(max = 45)
    @Column(name = "correo2")
    private String correo2;
    @Size(max = 45)
    @Column(name = "correo3")
    private String correo3;
    @Size(max = 45)
    @Column(name = "msn")
    private String msn;
	private String nombre;
	@Column(name = "tel1")
	private Integer tel1;
	@Column(name = "tel2")
	private Integer tel2;
	@Column(name = "tel3")
	private Integer tel3;
	private Proveedor proveedor;

    public Contacto() {
    }
    
    public Contacto(Integer idContacto, String nombre) {
        this.idContacto = idContacto;
        this.nombre = nombre;
    }

	public Integer getIdContacto() {
		return this.idContacto;
	}

	public void setIdContacto(Integer idContacto) {
		this.idContacto = idContacto;
	}


	public String getCorreo1() {
		return this.correo1;
	}

	public void setCorreo1(String correo1) {
		this.correo1 = correo1;
	}


	public String getCorreo2() {
		return this.correo2;
	}

	public void setCorreo2(String correo2) {
		this.correo2 = correo2;
	}


	public String getCorreo3() {
		return this.correo3;
	}

	public void setCorreo3(String correo3) {
		this.correo3 = correo3;
	}


	public String getMsn() {
		return this.msn;
	}

	public void setMsn(String msn) {
		this.msn = msn;
	}


	public String getNombre() {
		return this.nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}


	public Integer getTel1() {
		return this.tel1;
	}

	public void setTel1(Integer tel1) {
		this.tel1 = tel1;
	}


	public Integer getTel2() {
		return this.tel2;
	}

	public void setTel2(Integer tel2) {
		this.tel2 = tel2;
	}


	public Integer getTel3() {
		return this.tel3;
	}

	public void setTel3(Integer tel3) {
		this.tel3 = tel3;
	}


	//bi-directional many-to-one association to Proveedor
    @ManyToOne
	@JoinColumn(name="idProv")
	public Proveedor getProveedor() {
		return this.proveedor;
	}

	public void setProveedor(Proveedor proveedor) {
		this.proveedor = proveedor;
	}
	
}